<html>
<head>
    <link href="../css/dialog.css" rel="stylesheet">
    <link href="../css/uploadifive.css" rel="stylesheet">
    <script src="https://cdn.bootcss.com/jquery/3.4.1/jquery.js"></script>
    <script src="https://cdn.bootcss.com/jqueryui/1.12.1/jquery-ui.js"></script>
    <script src="https://cdn.bootcss.com/font-awesome/5.10.0-12/js/all.min.js"></script>
    <script type='text/javascript' src='../js/dialog_function.js'></script>
    <script type='text/javascript' src='../js/jquery.uploadifive.js'></script>
    <?php
    include "../class/suggest_needshow.php";
    include '../db/sql.php';
    include '../functions.php';

    ?>
</head>
<body>
<?php
$new_suggest = new \suggest_content\suggest_needshow();
$sug_array["SN"] = $_GET["sn"];
$sn = $_GET["sn"];
$from = $db->query("SELECT * from T_Suggest WHERE SN = '$sn'");
$row = $from->fetch();
$sug_array["AddTime"] = $row['AddTime'];
$sug_array["AddUserId"] = $row['AddUserId'];
$sug_array["AddUserName"] = $row['AddUserName'];
$sug_array["AddUserDept"] = $row['AddUserDept'];
$sug_array["AddUserMobile"] = $row["AddUserMobile"];
$sug_array["State"] = $row["State"];
$sug_array["S_Title"] = $row["S_Title"];
$sug_array["S_Type"] = $row["S_Type"];
$sug_array["ImportantLevel"] = $row['ImportantLevel'];
$sug_array["SuggestDept"] = $row['SuggestDept'];
$sug_array["SuggestImpl"] = $row['SuggestImpl'];
$sug_array["FinishTime"] = $row['FinishTime'];
$sug_array["Score"] = $row['Score'];
$sug_array["PracticalMeasuals"] = $row['PracticalMeasuals'];
$sug_array["CurrentDesc"] = $row['CurrentDesc'];
$sug_array["ImproveMethod"] = $row['ImproveMethod'];
$sug_array["AnticipateResult"] = $row['AnticipateResult'];
$sug_array['ForecastTime'] = $row['ForecastTime'];
$ci_time = $row['CIComfirmTime'];
$auditor_time = $row['AuditorComfirmTime'];
$from = $db->query("SELECT * from T_SuggestReason WHERE SN = '$sn'");
$row = $from->fetch();
$sug_array["RefuseReason"] = $row['RefuseReason'];
$sug_array["refuseSegment"] = $row['AddSegment'];
$id = $row['AddUserId'];
$sug_array["refuseName"] = FindName($db,$id);
$new_suggest->make_suggest($sug_array);
?>
<div class='dialog_form'>
    <div class="title_border">
        <div class='form_title'>合理化建议明细</div>
        <a onclick="close_dialog()"><i class="fas fa-times"></i></a>
    </div>
    <div class="dailog_content_border">
    <table>
        <tr>
            <td class="row_name">SN</td>
            <td class="row_content"><input id='SN' class='form_input' readonly='readonly' value='<?php echo $new_suggest->suggest_array['SN'] ?>'></td>
            <td class="row_name">提议日期</td>
            <td class="row_content"><input id='AddTime' class='form_input' readonly='readonly' value='<?php echo $new_suggest->suggest_array['AddTime'] ?>'></td>
        </tr>
        <tr>
            <td class="row_name">员工工号</td>
            <td class="row_content"><input id='Account' class='form_input' readonly='readonly' value='<?php echo $new_suggest->suggest_array['AddUserId'] ?>'></td>
            <td class="row_name">员工姓名</td>
            <td class="row_content"><input id='AddName' class='form_input' readonly='readonly' value='<?php echo $new_suggest->suggest_array['AddUserName'] ?>'></td>
        </tr>
        <tr>
            <td class="row_name">添加人电话</td>
            <td class="row_content"><input id='AddPhone' class='form_input' readonly='readonly' value='<?php echo $new_suggest->suggest_array['AddUserMobile'] ?>'></td>
            <td class="row_name">当前状态</td>
            <td class="row_content"><input id='State' class='form_input' readonly='readonly' value='<?php echo $new_suggest->suggest_array['State'] ?>'></td>
        </tr>
        <tr>
            <td class="row_name">所属部门</td>
            <td class="row_content"><input id='AddUserDept' class='form_input' readonly='readonly' value='<?php echo $new_suggest->suggest_array['AddUserDept'] ?>'></td>
            <td class="row_name">提议名称</td>
            <td class="row_content"><input id='S_Title' class='form_input' readonly='readonly' value='<?php echo $new_suggest->suggest_array['S_Title'] ?>'></td>
        </tr>
        <tr>
            <td class="row_name">提议类型</td>
            <td class="row_content"><input id="S_Type" class="form_input" readonly='readonly' value='<?php echo $new_suggest->suggest_array['S_Type'] ?>'></td>
            <td class="row_name">重要等级</td>
            <td class="row_content"><input id='Suggest_importantLevel' class='form_input' readonly='readonly' value='<?php echo $new_suggest->suggest_array['ImportantLevel'] ?>'></td>
        </tr>
        <tr>
            <td class="row_name">建议实施部门</td>
            <td class="row_content"><input id="SuggestDept" class="form_input" readonly='readonly' value='<?php echo $new_suggest->suggest_array['SuggestDept'] ?>'></td>
            <td class="row_name">建议实施人</td>
            <td class="row_content"><input id="SuggestImpl" class="form_input" readonly='readonly' value='<?php echo $new_suggest->suggest_array['SuggestImpl'] ?>'></td>
        </tr>
        <tr>
            <td class="row_name">CI评审时间</td>
            <td class="row_content"><input id="SuggestDept" class="form_input" readonly='readonly' value='<?php echo $ci_time ?>'></td>
            <td class="row_name">部门评审时间</td>
            <td class="row_content"><input id="SuggestImpl" class="form_input" readonly='readonly' value='<?php echo $auditor_time ?>'></td>
        </tr>
        <tr>
            <td class="row_name">承诺实施时间</td>
            <td class="row_content"><input id="ForecastTime" class="form_input" readonly='readonly' value='<?php echo $new_suggest->suggest_array['ForecastTime'] ?>'></td>
            <td class="row_name"></td>
            <td class="row_content"></td>
        </tr>
        <tr>
            <td class="row_name">完成实施时间</td>
            <td class="row_content"><input id="FinishTime" class="form_input" readonly='readonly' value='<?php echo $new_suggest->suggest_array['FinishTime'] ?>'></td>
            <td class="row_name">评分结果</td>
            <td class="row_content"><input id="Score" class="form_input" readonly='readonly' value='<?php echo $new_suggest->suggest_array['Score'] ?>'></td>
        </tr>
        <tr>
            <td class="row_name">
                实际采取措施
            </td>
            <td colspan="3" class="row_content">
                <textarea id="CurrentDesc" name="CurrentDesc" rows="3" class='form_input' readonly='readonly'><?php echo $new_suggest->suggest_array['PracticalMeasuals'] ?></textarea>
            </td>
        </tr>
        <tr>
            <td class="row_name">
                现状描述
            </td>
            <td colspan="3" class="row_content">
                <textarea id="CurrentDesc" name="CurrentDesc" rows="3" class='form_input' readonly='readonly'><?php echo $new_suggest->suggest_array['CurrentDesc'] ?></textarea>
            </td>
        </tr>
        <tr>
            <td class="row_name">
                改进措施
            </td>
            <td colspan="3" class="row_content">
                <textarea id="ImproveMethod" name="ImproveMethod" rows="3" class='form_input' readonly='readonly'><?php echo $new_suggest->suggest_array['ImproveMethod'] ?></textarea>
            </td>
        </tr>
        <tr>
            <td class="row_name">
                预计效果
            </td>
            <td colspan="3" class="row_content">
                <textarea id="AnticipateResult" name="AnticipateResult" rows="3" class='form_input' readonly='readonly'><?php echo $new_suggest->suggest_array['AnticipateResult'] ?></textarea>
            </td>
        </tr>
        <tr>
            <td class="row_name">
                相关文件
            </td>
            <td colspan="3" class="row_content">
                <?php $new_suggest->need_show_files($db,$sn);?>
            </td>
        </tr>
        <tr>
            <td class="row_name">
                被拒绝原因
            </td>
            <td colspan="3" class="row_content">
                <textarea id="RefuseReason" name="RefuseReason" rows="3" class='form_input' readonly='readonly'><?php echo $new_suggest->suggest_array['RefuseReason'] ?></textarea>
            </td>
        </tr>
        <tr>
            <td class="row_name">拒绝环节</td>
            <td class="row_content"><input id="refuseSegment" class="form_input" readonly='readonly' value='<?php echo $new_suggest->suggest_array['refuseSegment'] ?>'></td>
            <td class="row_name">操作人</td>
            <td class="row_content"><input id="refuseName" class="form_input" readonly='readonly' value='<?php echo $new_suggest->suggest_array['refuseName'] ?>'></td>
        </tr>
    </table>
    </div>
</div>
</body>
</html>